***Figure 3: Mean Duration Settings Compared to Non-Violent Video Condition***


**Duration: All Trials**

*RVV
ttest duration_mean_all if (treatment == 1 | treatment == 3) & round == 1, by(treatment)
replace t_meanr_dur = r(mu_1)-r(mu_2) in 1
replace t_upperr_dur = (r(mu_1)-r(mu_2))+(r(sd_1)/(r(N_1)^(0.5))) in 1
replace t_lowerr_dur = (r(mu_1)-r(mu_2))-(r(sd_1)/(r(N_1)^(0.5))) in 1

*FVV
ttest duration_mean_all if (treatment == 2 | treatment == 3) & round == 1, by(treatment)
replace t_meanf_dur = r(mu_1)-r(mu_2) in 1
replace t_upperf_dur = (r(mu_1)-r(mu_2))+(r(sd_1)/(r(N_1)^(0.5))) in 1
replace t_lowerf_dur = (r(mu_1)-r(mu_2))-(r(sd_1)/(r(N_1)^(0.5))) in 1

anova duration_mean_all treatment if (treatment == 1 | treatment == 2) & round == 1
replace pvalue_dur = Ftail(e(df_m), e(df_r), e(F)) in 1


**Duration: Trial 1**

*RVV
ttest valuesp_blast_duration if (treatment == 1 | treatment == 3) & round == 1, by(treatment)
replace t_meanr_dur = r(mu_1)-r(mu_2) in 2
replace t_upperr_dur = (r(mu_1)-r(mu_2))+(r(sd_1)/(r(N_1)^(0.5))) in 2
replace t_lowerr_dur = (r(mu_1)-r(mu_2))-(r(sd_1)/(r(N_1)^(0.5))) in 2

*FVV
ttest valuesp_blast_duration if (treatment == 2 | treatment == 3) & round == 1, by(treatment)
replace t_meanf_dur = r(mu_1)-r(mu_2) in 2
replace t_upperf_dur = (r(mu_1)-r(mu_2))+(r(sd_1)/(r(N_1)^(0.5))) in 2
replace t_lowerf_dur = (r(mu_1)-r(mu_2))-(r(sd_1)/(r(N_1)^(0.5))) in 2

anova valuesp_blast_duration treatment if (treatment == 1 | treatment == 2) & round == 1
replace pvalue_dur = Ftail(e(df_m), e(df_r), e(F)) in 2


**Duration: Trial 2**

*RVV
ttest valuesp_blast_duration if (treatment == 1 | treatment == 3) & round == 2, by(treatment)
replace t_meanr_dur = r(mu_1)-r(mu_2) in 3
replace t_upperr_dur = (r(mu_1)-r(mu_2))+(r(sd_1)/(r(N_1)^(0.5))) in 3
replace t_lowerr_dur = (r(mu_1)-r(mu_2))-(r(sd_1)/(r(N_1)^(0.5))) in 3

*FVV
ttest valuesp_blast_duration if (treatment == 2 | treatment == 3) & round == 2, by(treatment)
replace t_meanf_dur = r(mu_1)-r(mu_2) in 3
replace t_upperf_dur = (r(mu_1)-r(mu_2))+(r(sd_1)/(r(N_1)^(0.5))) in 3
replace t_lowerf_dur = (r(mu_1)-r(mu_2))-(r(sd_1)/(r(N_1)^(0.5))) in 3

anova valuesp_blast_duration treatment if (treatment == 1 | treatment == 2) & round == 2
replace pvalue_dur = Ftail(e(df_m), e(df_r), e(F)) in 3


**Duration: After Wins**

*RVV
ttest duration_mean_afterwins if (treatment == 1 | treatment == 3) & round == 1, by(treatment)
replace t_meanr_dur = r(mu_1)-r(mu_2) in 4
replace t_upperr_dur = (r(mu_1)-r(mu_2))+(r(sd_1)/(r(N_1)^(0.5))) in 4
replace t_lowerr_dur = (r(mu_1)-r(mu_2))-(r(sd_1)/(r(N_1)^(0.5))) in 4

*FVV
ttest duration_mean_afterwins if (treatment == 2 | treatment == 3) & round == 1, by(treatment)
replace t_meanf_dur = r(mu_1)-r(mu_2) in 4
replace t_upperf_dur = (r(mu_1)-r(mu_2))+(r(sd_1)/(r(N_1)^(0.5))) in 4
replace t_lowerf_dur = (r(mu_1)-r(mu_2))-(r(sd_1)/(r(N_1)^(0.5))) in 4

anova duration_mean_afterwins treatment if (treatment == 1 | treatment == 2) & round == 1
replace pvalue_dur = Ftail(e(df_m), e(df_r), e(F)) in 4


**Duration: After Losses**

*RVV
ttest duration_mean_afterloss if (treatment == 1 | treatment == 3) & round == 1, by(treatment)
replace t_meanr_dur = r(mu_1)-r(mu_2) in 5
replace t_upperr_dur = (r(mu_1)-r(mu_2))+(r(sd_1)/(r(N_1)^(0.5))) in 5
replace t_lowerr_dur = (r(mu_1)-r(mu_2))-(r(sd_1)/(r(N_1)^(0.5))) in 5

*FVV
ttest duration_mean_afterloss if (treatment == 2 | treatment == 3) & round == 1, by(treatment)
replace t_meanf_dur = r(mu_1)-r(mu_2) in 5
replace t_upperf_dur = (r(mu_1)-r(mu_2))+(r(sd_1)/(r(N_1)^(0.5))) in 5
replace t_lowerf_dur = (r(mu_1)-r(mu_2))-(r(sd_1)/(r(N_1)^(0.5))) in 5

anova duration_mean_afterloss treatment if (treatment == 1 | treatment == 2) & round == 1
replace pvalue_dur = Ftail(e(df_m), e(df_r), e(F)) in 5


**Convert p-values to three digits for graphs**

replace pvalue_dur = round(pvalue_dur,0.001)
replace pvalue_dur = pvalue_dur*1000
rename pvalue_dur pvalue_durold
tostring pvalue_durold,gen(pvalue_dur)
gen count = length(pvalue_dur)
replace count =  0 if pvalue_dur == "."
replace pvalue_dur =  "" if pvalue_dur == "."
replace pvalue_dur = "0.00" + pvalue_dur if count == 1
replace pvalue_dur = "0.0" + pvalue_dur if count == 2
replace pvalue_dur = "0." + pvalue_dur if count == 3
drop count


**Create the graph**

local pvalue_dur = pvalue_dur in 1

twoway  (bar t_meanr_dur x_r if _n == 1, barwidth(.5) color(gs8) lcolor(black) lwidth(vthin)) (rcap t_upperr_dur t_lowerr_dur x_r if _n == 1, lcolor(black)) (bar t_meanf_dur x_f if _n == 1, barwidth(.5) color(white) lcolor(black) lwidth(vthin)) (rcap t_upperf_dur t_lowerf_dur x_f if _n == 1, lcolor(black)), xscale(lstyle(none)) xlabel(0.3 " " 1 `""{bf:All Trials}" "{it:Average Aggression}" "{stSans:({it:p} = `pvalue_dur')}"' 1.7 " ",notick) ylabel(-2 " " -1.5 -1 "-1.0" -.5 "-0.5" 0 .5 "+0.5" 1 "+1.0" 1.5 "+1.5", nogrid notick labgap(2) labsize(small)) ytick(-1.5 -1 -.5 0 .5 1 1.5) yline(0) name(durationall, replace) legend(off) ytitle("Difference from Non-Violent Video (NVV) Group",orientation(vertical))

local pvalue_dur = pvalue_dur in 2

twoway  (bar t_meanr_dur x_r if _n == 2, barwidth(.5) color(gs8) lcolor(black) lwidth(vthin)) (rcap t_upperr_dur t_lowerr_dur x_r if _n == 2, lcolor(black)) (bar t_meanf_dur x_f if _n == 2, barwidth(.5) color(white) lcolor(black) lwidth(vthin)) (rcap t_upperf_dur t_lowerf_dur x_f if _n == 2, lcolor(black)), xscale(lstyle(none)) xlabel(0 " " 1 `""{bf:Trial 1}" "{it:Unprovoked Aggression}" "{stSans:({it:p} = `pvalue_dur')}"'  2 " ",notick) yscale(off) yline(0) ylabel(,nogrid) name(durationr1, replace) legend(off)

addplot durationr1: pcarrowi 0.75 0.85 0.65 1.2 (9) "Standard errors ", norescaling  msize(vtiny) lwidth(vthin)

local pvalue_dur = pvalue_dur in 3

twoway  (bar t_meanr_dur x_r if _n == 3, barwidth(.5) color(gs8) lcolor(black) lwidth(vthin)) (rcap t_upperr_dur t_lowerr_dur x_r if _n == 3, lcolor(black)) (bar t_meanf_dur x_f if _n == 3, barwidth(.5) color(white) lcolor(black) lwidth(vthin)) (rcap t_upperf_dur t_lowerf_dur x_f if _n == 3, lcolor(black)), xscale(lstyle(none)) xlabel(0 " " 1 `""{bf:Trial 2}" "{it:Provoked Aggression}" "{stSans:({it:p} = `pvalue_dur')}"'  2 " ",notick) yscale(off) yline(0) ylabel(,nogrid) name(durationr2, replace) legend(region(lwidth(none)) order(1 "Real Violence Video (RVV)" 3 "Fictional Violence Video (FVV)") rows(2) cols(1) ring(0) position(12) symxsize(4) symysize(4) size(small))

local pvalue_dur = pvalue_dur in 4

twoway  (bar t_meanr_dur x_r if _n == 4, barwidth(.5) color(gs8) lcolor(black) lwidth(vthin)) (rcap t_upperr_dur t_lowerr_dur x_r if _n == 4, lcolor(black)) (bar t_meanf_dur x_f if _n == 4, barwidth(.5) color(white) lcolor(black) lwidth(vthin)) (rcap t_upperf_dur t_lowerf_dur x_f if _n == 4, lcolor(black)), xscale(lstyle(none)) xlabel(0 " " 1 `""{bf:After Wins}" "{it:Unprovoked Aggression}" "{stSans:({it:p} = `pvalue_dur')}"'  2 " ",notick) yscale(off) yline(0) ylabel(,nogrid) name(durationafterwins, replace) legend(off)

addplot durationafterwins: pcarrowi -.75 .075 -.075  0  (6) "NVV baseline" lcolor(black), norescaling  msize(vtiny) lwidth(vthin) 

local pvalue_dur = pvalue_dur in 5

twoway  (bar t_meanr_dur x_r if _n == 5, barwidth(.5) color(gs8) lcolor(black) lwidth(vthin)) (rcap t_upperr_dur t_lowerr_dur x_r if _n == 5, lcolor(black)) (bar t_meanf_dur x_f if _n == 5, barwidth(.5) color(white) lcolor(black) lwidth(vthin)) (rcap t_upperf_dur t_lowerf_dur x_f if _n == 5, lcolor(black)), xscale(lstyle(none)) xlabel(0 " " 1 `""{bf:After Losses}" "{it:Provoked Aggression}" "{stSans:({it:p} = `pvalue_dur')}"'  2 " ",notick) yscale(off) yline(0) ylabel(,nogrid) name(durationafterlosses, replace) legend(off) 

graph combine durationall durationr1 durationr2 durationafterwins durationafterlosses, iscale(1) ycommon imargin(0) cols(5) xsize(5) ysize(2) name(durationcombined, replace) title({bf:Duration}) note(" " " " "{space 15}{bf: Note:} {it:p}-values refer to a one-way ANOVA between the RVV and FVV, testing the hypothesis that {&mu}{subscript:RVV} = {&mu}{subscript:FVV}.")

graph export Graphs/figure-3.pdf, replace

graph drop durationall durationr1 durationr2 durationafterwins durationafterlosses

